package com.ssm.subject.application.controller;

import com.alibaba.fastjson.JSON;
import com.google.common.base.Preconditions;
import com.ssm.subject.application.convert.SubjectCategoryDTOConvert;
import com.ssm.subject.application.convert.SubjectLabelDTOConvert;
import com.ssm.subject.application.dto.SubjectCategoryDTO;
import com.ssm.subject.application.dto.SubjectLabelDTO;
import com.ssm.subject.common.entity.PageResult;
import com.ssm.subject.common.entity.Result;
import com.ssm.subject.domain.bo.SubjectCategoryBO;
import com.ssm.subject.domain.service.SubjectCategoryDomainService;
import com.ssm.subject.infra.basic.entity.SubjectInfoEs;
import com.ssm.subject.infra.basic.service.SubjectEsService;
import com.ssm.subject.infra.entity.UserInfo;
import com.ssm.subject.infra.rpc.UserRpc;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.lang.StringUtils;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.LinkedList;
import java.util.List;

/**
 * 刷题分类controller
 */
@RestController
@RequestMapping("/subject/category")
@Log4j2
public class TestUserFeignController {
    @Resource
    private UserRpc userRpc;

//    @Resource
//    private SubjectEsService subjectEsService;

    @GetMapping("/test")
    public void test() {
        UserInfo userInfo = userRpc.getUserInfo("oj6nl68fpFPRVxdHfzZZX-4GjK7U");
        System.out.println(userInfo);
    }

//
//    @GetMapping("/createIndex")
//    public void createIndex() {
//        subjectEsService.createIndex();
//    }
//
//    @GetMapping("/addDocs")
//    public void addDocs() {
//        subjectEsService.addDocs();
//    }
//
//    @GetMapping("/find")
//    public void find() {
//        subjectEsService.find();
//    }
//
//    @GetMapping("/search")
//    public void search() {
//        subjectEsService.search();
//    }
}
